import axios from '@/utils/axios'
import moment from "moment";

export function getRulePage(params) {
  return axios({
    url: '/KpiRule/page',
    method: 'get',
    data: params
  })
}

export function updatetRule(params) {
    return axios({
      url: '/KpiRule/update',
      method: 'post',
      data: params
    })
  }

export function deletetRule(params) {
    return axios({
      url: '/KpiRule/delete',
      method: 'post',
      data: params
    })
  }

  export function addRule(params) {
    return axios({
      url: '/KpiRule/add',
      method: 'post',
      data: params
    })
  }

  export function getKpiPercent(params) {
    return axios({
      url: '/KpiRule/getKpiPercent',
      method: 'get',
      data: params
    })
  }

  export function addAssessor(params) {
    return axios({
      url: '/KpiRule/addAssessor',
      method: 'post',
      data: params
    })
  }
  
  export function getPositionKpiList(params) {
    return axios({
      url: '/KpiRule/getPositionKpiList',
      method: 'post',
      data: params
    })
  }
  
  export function getRuleList(params) {
    return axios({
      url: '/KpiRule/getRuleList',
      method: 'post',
      data: params
    })
  }

  export function getOneRuleList(params) {
    return axios({
      url: '/KpiRule/getPositionKpi',
      method: 'post',
      data: params
    })
  }

  export function updateAssessor(params) {
    return axios({
      url: '/KpiRule/updateAssessor',
      method: 'post',
      data: params
    })
  }
  
  export function removeAssessor(params) {
    return axios({
      url: '/KpiRule/removeAssessor',
      method: 'post',
      data: params
    })
  }

  export function copy(params) {
    return axios({
      url: '/KpiRule/copy',
      method: 'post',
      data: params
    })
  }
  
  export function getKpiPastPage(params) {
    return axios({
      url: '/KpiRule/kpiPastPage',
      method: 'get',
      data: params
    })
  }

  export function getKpiPastSearch(params) {
    return axios({
      url: '/KpiRule/pastSearch',
      method: 'get',
      data: params
    })
  }

